package com.ssy.system.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ssy.common.utils.PageResult;
import com.ssy.common.utils.Result;
import com.ssy.system.pojo.Role;
import com.ssy.system.vo.RoleVo;

import java.util.List;

/**
 * @author ssy
 */
public interface IRoleService extends IService<Role> {

    PageResult loadAllRolePage(RoleVo roleVo);

    Result insertRole(Role role);

    Result updateRole(Role role);

    Result deleteRoleById(Integer id);

    Result bathDeleteRole(Integer[] ids);

    Result queryRolesByUserId(Integer userId);

    List<String> queryRoleNamesByUserId(Integer id);

    void saveRolePermission(Integer roleId, Integer[] pids);

}
